﻿{{log this}}
<h2 style="margin: 15px; display: inline-block">
	{{#if myInfo}}
		Mano informacija</h2>
	{{else}}
		{{#if userContent}}
			{{userContent.firstName}}&nbsp;{{userContent.surname}}	
		{{else}}
			Naujas naudotojas
		{{/if}}
		</h2><a class="link-back" {{action goToAdminTab}} >(atgal į Administravimą)</a>
	{{/if}}

<div id="userInfoTab">
	<ul class='ulWhiteMenu'>
		<li><a href="#userInfoData"><span>Duomenys</span></a></li>		
		<li><a href="#userInfoRights"><span>Pranešimų nustatymai</span></a></li>	
	</ul>
	<div id="userInfoData">
	<div id="InfoDataForm" class="js-frm whiteTab container" data-ctrl='{"NewRec":0,"Source":"tblUsers","id":0}'>
		{{#if userContent}}
		@*-------------------------------------------------------------------------------------------------------------*@
			{{#with userContent}}
			<div class="row border ui-corner-all box_2pr">		
				{{updatableField firstName classes="wrapper:'three col'" labelType="Top"}}
				{{updatableField surname classes="wrapper:'three col'" labelType="Top"}}
				{{updatableField languageID classes="wrapper:'three col'" labelType="Top"}}
			</div>
			</br></br>
			
			<h3 class="tableTitle">Kontaktiniai duomenys, kuriuos reikia nurodyti pranešimuose draudikui apie žalą</h3>
			<div class="row border ui-corner-all box_2pr">
				{{updatableField position classes="wrapper:'three col'" labelType="Top"}}
				{{updatableField phone classes="wrapper:'three col'" labelType="Top"}}				
				{{updatableField eMailForIns classes="wrapper:'three col'" labelType="Top"}}
				{{updatableField mobPhone classes="wrapper:'three col'" labelType="Top"}}
			</div>
			</br></br>
			{{/with}}
			<h3 class="tableTitle">Prisijungimo duomenys</h3>		
 			<div class="row border ui-corner-all box_2pr">
			{{#with userContent}}{{updatableField email classes="wrapper:'col six'" id="systemEmail" labelType="Top"}}{{/with}}
			@*-------------------------------------------------*@
			<div class="col six">
			{{#if myInfo}}
					<a class="btn" style="line-height:15px;margin-top:22px" {{action changeMyPassword}} >Pakeisti slaptažodį</a>
			</div>
			{{else}}
					{{#if passwordReset}}
						<div class="well cont box-1pr-margin" style="display:inline-block">
							<p>Slaptažodžio atstatymas vyksta išsiunčiant naudotojui el. laišką su patvirtinimo nuoroda.</p>
							<button class="btn" style="float:left;margin:10px" {{action sendUserPassword}}>Siųsti</button>
							<a style="float:left;line-height:40px;margin:10px" {{action cancelSendUserPassword}} >Atšaukti</a>
						</div>
					{{else}}
						<a class="btn" style="margin-top:8px;" {{action sendUserPasswordForm}} >Atstatyti slaptažodį</a>
					{{/if}}		
			</div>
					<div class="row">{{updatableField isActive classes="wrapper:'col six'" labelType="Left"}}</div>
					<p id="savePasswordNote" style="color:#B94A48;display:inline-block"></p>
			{{/if}}		
			@*-------------------------------------------------*@
			</div>	
			</br></br>
		{{else}}			
		@*-------------------------------------------------------------------------------------------------------------*@
			<div class="row border ui-corner-all box_2pr">		
				<div class="ExtendIt three col" data-ctrl='{"Value":"","Field":"FirstName","labelType":"Top"}'></div>
				<div class="ExtendIt three col" data-ctrl='{"Value":"","Field":"Surname","labelType":"Top"}'></div>
				<div class="ExtendIt three col" data-ctrl='{"Value":1,"Field":"LanguageID","labelType":"Top"}'></div>
			</div>	
			
			<br><h3 class="tableTitle">Kontaktiniai duomenys, kuriuos reikia nurodyti pranešimuose draudikui apie žalą</h3>
			<div class="row border ui-corner-all box_2pr">
				<div class="ExtendIt three col" data-ctrl='{"Value":"","Field":"Position","labelType":"Top"}'></div>
				<div class="ExtendIt three col" data-ctrl='{"Value":"","Field":"Phone","labelType":"Top"}'></div>			
				<div class="ExtendIt three col" data-ctrl='{"Value":"","Field":"EMailForIns","labelType":"Top"}'></div>
				<div class="ExtendIt three col" data-ctrl='{"Value":"","Field":"MobPhone","labelType":"Top"}'></div>
			</div>
			
			<br><h3 class="tableTitle">Prisijungimo duomenys</h3>
			<div class="row border ui-corner-all box_2pr">
				<div class="ExtendIt six col" data-ctrl='{"Value":"","Field":"Email","classes":"UpdateField","labelType":"Top"}'></div>
				{{#unless userContent}}
					<span class="six col text-red">Išsaugojus, šiuo adresu bus išsiųstas laiškas su nuoroda slaptažodžio sukūrimui.</span>
				{{/unless}}
				<div class="row"><div class="ExtendIt six col" data-ctrl='{"Value":true,"Field":"IsActive","classes":"UpdateField","labelType":"Left"}'></div></div>
			</div>	
		@*-------------------------------------------------------------------------------------------------------------*@
		{{/if}}	
	</div>
	{{view App.FormBottomView target="App.userCardController"}}
	</div>
	
	<div id="userInfoRights">
		<h3 class="tableTitle">Gauti pranešimus el. paštu</h3>
		<table class="zebra-striped"><tbody>
			<tr class="border"><td><label style="display:inline-block;"><input type="checkbox" name="warnOnNewClaim"/> kai įvedama nauja žala.</label></td></tr>		
			<tr class="border"><td><label style="display:inline-block;"><input type="checkbox" name="warnOnTaskExpire"/> kai iki man priskirtos užduoties atlikimo termino liko</label><span class="leftBlock inputInLine short-child-input"><input type="text" value="1"/></span> d.</td></tr>		
			<tr class="border"><td><label style="display:inline-block;"><input type="checkbox" name="warnOnInfoSubmitExpire"/> kai iki visos informacijos pateikimo draudikui termino liko</label><span class="leftBlock inputInLine short-child-input"><input type="text" value="1" /></span> d.</td></tr>		
			<tr class="border"><td><label style="display:inline-block;"><input type="checkbox" name="warnOnPaymentExpire"/> kai yra pradelstas draudimo išmokos gavimo terminas.</label></td></tr>		
		</tbody>
		</table>

@*		<button class="btn btnSave customButtonDisabled" style="float:right;margin:40pxbackground-color:#EB5A44;color:#FFFFFF;" {{action saveUserRights}}>Išsaugoti</button></br>
*@	</div>

</div>
